package com.heima.apis.wemedia;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.schedule.dtos.Task;
import com.heima.model.wemedia.dtos.ChannelDto;
import com.heima.model.wemedia.pojos.WmChannel;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("leadnews-wemedia")
public interface IWemediaClient {

    /**
     * 修改频道
     *
     * @param wmChannel
     * @return
     */
    @PostMapping("/api/v1/channel/update")
    public ResponseResult updateChannels(@RequestBody WmChannel wmChannel);

    /**
     * 保存频道
     *
     * @param wmChannel
     * @return
     */
    @PostMapping("/api/v1/channel/save")
    public ResponseResult saveChannels(@RequestBody WmChannel wmChannel);

    /**
     * 频道名称模糊分页查询
     *
     * @param dto
     * @return
     */
    @PostMapping("/api/v1/channel/list")
    public ResponseResult checkListChannels(@RequestBody ChannelDto dto);


    /**
     * 平台管理-删除频道
     *
     * @param id
     * @return
     */
    @GetMapping("/api/v1/channel/del/{id}")
    public ResponseResult delChannels(@PathVariable("id") Integer id);

}
